package org.liang.domain;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.liang.dto.QuestionData;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author liang
 * @since 2024-05-29
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_tenant")
public class Tenant extends Model<Tenant> {

    private static final long serialVersionUID = 1L;

    /** 待审核 **/
    public static final int STATE_WAIT_AUDIT = 1 ; //"待审核";
    /** 审核通过，待激活 **/
    public static final int STATE_WAIT_ACTIVE = 2 ; //"审核通过，待激活";
    /** 激活成功 **/
    public static final int STATE_ACTIVE_SUCCESS = 3 ; //"激活成功";
    /** 驳回 **/
    public static final int STATE_REJECT_AUDIT = 4 ; //"驳回";

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @TableField("company_name")
    private String companyName;
    @TableField("company_num")
    private String companyNum;
    @TableField("register_time")
    private Date registerTime;
    /**
     * 0待审核，1 审核通过 ， 2审核失败
     */
    private Integer state;
    private String address;
    private String logo;
    /**
     * 店铺管理员
     */
    @TableField("admin_id")
    private Long adminId;
    /**
     * 类型id
     */
    @TableField("type_id")
    private Long typeId;

    @TableField(exist = false)
    private QuestionData questionData;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCompanyNum() {
        return companyNum;
    }

    public void setCompanyNum(String companyNum) {
        this.companyNum = companyNum;
    }

    public Date getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public Long getAdminId() {
        return adminId;
    }

    public void setAdminId(Long adminId) {
        this.adminId = adminId;
    }

    public Long getTypeId() {
        return typeId;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Tenant{" +
                "id=" + id +
                ", companyName='" + companyName + '\'' +
                ", companyNum='" + companyNum + '\'' +
                ", registerTime=" + registerTime +
                ", state=" + state +
                ", address='" + address + '\'' +
                ", logo='" + logo + '\'' +
                ", adminId=" + adminId +
                ", typeId=" + typeId +
                ", questionData=" + questionData +
                '}';
    }
}
